import $http from "./requst";

export const login = (data) =>
  $http({ url: "/admin/login", method: "post", data });
export const getUserInfo = () =>
  $http({ url: "/admin/userInfo", method: "post" });
export const passwordEdit = (data) =>
  $http({ url: "/admin/password/edit", method: "post", data });

export const account = (data) =>
  $http({ url: "/admin/account/list", method: "post", data });

export const accountAdd = (data) =>
  $http({ url: "/admin/account/add", method: "post", data });

export const accountEdit = (data) =>
  $http({ url: "/admin/account/edit", method: "post", data });

export const accountDel = (data) =>
  $http({ url: "/admin/account/del", method: "post", data });

export const accountStatus = (data) =>
  $http({ url: "/admin/account/status", method: "post", data });

// 商品相关接口
export const product = (data) =>
  $http({ url: "/admin/product/list", method: "post", data });

export const productAdd = (data) =>
  $http({ url: "/admin/product/add", method: "post", data });

export const productEdit = (data) =>
  $http({ url: "/admin/product/edit", method: "post", data });

export const productDel = (data) =>
  $http({ url: "/admin/product/del", method: "post", data });

export const productStatus = (data) =>
  $http({ url: "/admin/product/status", method: "post", data });
